package com.example.firstboot.mapper;

import com.example.firstboot.entity.TbUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TbUserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(TbUser record);

    int insertSelective(TbUser record);

    TbUser selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TbUser record);

    int updateByPrimaryKey(TbUser record);

    TbUser selectByUserAccount(String account);

    List<TbUser> selectByrole(@Param("roleflag") Integer roleflag, @Param("department") String department);

    Integer createAccount(String account, String username, String password, Integer roleFlag);

    List<TbUser> queryAllDoc();

    List<TbUser> fuzzyQuery(@Param("account") String account,@Param("username") String username,@Param("department") String department);

    Integer resetPasswordByAccount(String account, String md5);

    List<TbUser> selectSundayDoc(String department);

    Integer selectCountUserAmount(String roleflag);
}


